package singleton;

/**
 * @author Brook
 *
 * 懒汉式线程不安全，
 */
public class Singleton5
{

    private static Singleton5 instance;

    private Singleton5() {

    }

    public static Singleton5 getInstance() {
        if (instance == null) {
            synchronized(Singleton5.getInstance()){
                instance = new Singleton5();
            }

        }
        return instance;
    }
}
